package com.qdu.servlet;

import com.qdu.entity.Users;
import com.qdu.service.UsersService;
import com.qdu.service.impl.UsersServiceImpl;
import java.io.IOException;

import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

/**
 * 该Servlet负责处理修改学生信息的请求
 *
 * @author Anna
 */
@WebServlet("/sss")
public class ModifyUpwdServlet extends HttpServlet {
UsersService ss = new UsersServiceImpl();
    @Override
    protected void doPost(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {

        req.setCharacterEncoding("utf-8");
        String Upwd = req.getParameter("Upwd");
        String Uanswer = req.getParameter("Uanswer");

        Users user = new Users(Upwd,Uanswer); 


       int rows = ss.modifyUpwd(user);
        

        resp.getWriter().print(rows);
        
    }
}
